// 引入
// 创建
// 配置
// 暴露
// 挂在
import { createRouter, createWebHashHistory } from 'vue-router'
import Login from '../views/Login/index.vue'
// import List from '../views/List/index.vue'
// import News from '../views/News/index.vue'
// import Layout from '../Layout/index.vue'
const routes = [
    {
        path:'/login',name:'Login',component:Login
    },
{path:'/',name:'Layout',component:()=>import('../Layout/index.vue'),
children:[
    {
        path:'/list',name:'List',component:()=>import('../views/List/index.vue')
    },
    {
        path:'/news',name:'News',component:()=>import('../views/News/index.vue')
    },
]
},
{
    path:'/cart',name:'Cart',component:()=>import('../views/Cart/index.vue')
},


]
const router = createRouter({
history : createWebHashHistory(),
routes
})
export default router
